#include <iostream>
#include "server.hpp"
void usage(std::string proc)
{
    std::cout<<"usage:\n\t"<<proc<<" port\n"<<std::endl;
}
int main(int argc, char *argv[])
{
    if(argc!=2)
    {
        usage(argv[0]);
        exit(USAGE_ERR);
    }
    uint16_t port=atoi(argv[1]);
    TcpServer* tServer=new TcpServer(port);
    tServer->init();
    tServer->start();
    delete tServer;
    return 0;
}